package org.bai.meetingfilm.backend.show.provider.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName ProviderController
 * @Description 生产者Controller
 * @Author bai
 * @Date 2021/7/18 16:02
 * @Version 1.0
 **/
@RestController
@RequestMapping(value = "/provider")
public class ProviderController {

    private static final Logger LOGGER = LoggerFactory.getLogger(ProviderController.class);

    @Value("${server.port}")
    private int port;

    @GetMapping(value = "/sayHello")
    public String providerSayHello(String message) {
        LOGGER.error("provider sayHello port: [{}], message [{}]", port, message);
        return port + "对请求作出响应，请求信息为: " + message;
    }

}
